
package org.apache.solr.highlight;

import org.apache.lucene.search.vectorhighlight.BoundaryScanner;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.core.SolrInfoMBean;
import org.apache.solr.util.plugin.NamedListInitializedPlugin;

public abstract class SolrBoundaryScanner extends HighlightingPluginBase implements SolrInfoMBean, NamedListInitializedPlugin {

    public BoundaryScanner getBoundaryScanner(String fieldName, SolrParams params) {

        numRequests++;
        params = SolrParams.wrapDefaults(params, defaults);

        return get(fieldName, params);
    }

    protected abstract BoundaryScanner get(String fieldName, SolrParams params);
}
